@ECHO OFF
ECHO Check Dir...
SET bTool=0
for /R %%s in (*) do ( 
 IF "%%~xs"==".ice" (
	SET bTool=1
	BREAK
)
) 
IF %bTool%==1 (
ECHO Work in Root
GOTO bb
)
ECHO Jump to TamiServerCore
CD ..
:bb
ECHO ====Start Process TamiServer Slice =====
for /R %%s in (*) do ( 
 IF "%%~xs"==".ice" (
  ECHO '%%s`
  ECHO TamiServerCore
  C:/ZeroC/Ice-3.6.3/bin/slice2cpp.exe -IC:/ZeroC/Ice-3.6.3/slice --output-dir TamiServerCore %%s
  ECHO TamiServerSL 
  C:/ZeroC/Ice-3.6.3/bin/slice2cpp.exe -IC:/ZeroC/Ice-3.6.3/slice --output-dir TamiServerSL %%s
  ECHO TamiServerScript 
  C:/ZeroC/Ice-3.6.3/bin/slice2cpp.exe -IC:/ZeroC/Ice-3.6.3/slice --output-dir TamiServerScript %%s
  ECHO TamiServerScreenEx 
  C:/ZeroC/Ice-3.6.3/bin/slice2cpp.exe -IC:/ZeroC/Ice-3.6.3/slice --output-dir TamiServerScreenEx %%s
  goto end
)

) 
:end
ECHO ====End=====
IF %bTool%==1 (
pause
)

